"""
URL configuration for DjangoAiStory project.
AI故事管理系统后端API
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    # 管理后台
    path('admin/', admin.site.urls),
    
    # API路由
    path('api/auth/', include('accounts.urls')),
    path('api/users/', include('accounts.urls')),
    path('api/stories/', include('stories.urls')),
    path('api/', include('interactions.urls')),
]

# 开发环境下提供媒体文件访问
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

# 自定义管理后台标题
admin.site.site_header = 'AI故事管理系统'
admin.site.site_title = 'AI故事管理'
admin.site.index_title = '欢迎使用AI故事管理系统'
